/**
 * 
 */
package com.tomagency.cyberlab.server.exports;

import java.util.List;

import com.tomagency.cyberlab.server.config.CyberlabConfigProvider;
import com.tomagency.cyberlab.server.exports.BubuHandlerImpl.BubuGenResult;

import de.gammadata.business.modelle.BelegDO;
import de.gammadata.gwt.modelle.ResultObject;

/**
 * Classe Erzeugt xmlCode für einen Beleg
 * @author gfr
 *
 */
public interface BubuHandler {
	
	public CyberlabConfigProvider getCyberlabConfigProvider();
	public void setCyberlabConfigProvider(CyberlabConfigProvider cyberlabConfigProvider);

	public BubuGenResult genBubuXmlString(BelegDO beleg, boolean isTest,long orderId, long jobId);
	
	public ResultObject genBubuXmlOrderFile(BelegDO beleg,boolean isTest,long orderId, long jobId);
	
	public interface BubuStatus{
		public int getBelegNummer();
		public void setBelegNummer(int orderNummer);
		public String getOrderStatus();
		public void setOrderStatus(String orderStatus);
		public String getJobStatus();
		public void setJobStatus(String jobStatus);
		
		public static final String ITEM="item";
		public static final String ORDERID="orderid";
		public static final String ORDERSTATUS="orderstatus";
		public static final String JOBID="jobid";
		public static final String JOBSTATUS ="jobstatus";
		
		public static final String ORDERSTATUS_WAIT="wait";
		public static final String ORDERSTATUS_PRODUCTION="production";		
		public static final String ORDERSTATUS_NEW="new";
		public static final String ORDERSTATUS_READY="ready";
		public static final String ORDERSTATUS_DISPATCHED="dispatched";
		public static final String ORDERSTATUS_CANCELLED="cancelled";
		public static final String ORDERSTATUS_ERROR="error";
		
		public static final String JOBSTATUS_NEW="new";
		public static final String JOBSTATUS_HOLD="hold";
		public static final String JOBSTATUS_WAIT_IMPOSE="wait";
		public static final String JOBSTATUS_PROC_EXT="proc";
		public static final String JOBSTATUS_WORK_IMPOSE="work";
		public static final String JOBSTATUS_IMPOSE_DONE="done";
		public static final String JOBSTATUS_TRANSFERED="xfer";
		public static final String JOBSTATUS_ACEPTED="acptd";
		public static final String JOBSTATUS_PRINTED_PARTIAL="prntp";
		public static final String JOBSTATUS_PRINTED="prntd";
		public static final String JOBSTATUS_ZUSAMMENBAU="asmbl";
		public static final String JOBSTATUS_FERTIG="mnfct";
		public static final String JOBSTATUS_AUSGELIEFERT="ckout";
		public static final String JOBSTATUS_GELÖSCHT="delet";
		public static final String JOBSTATUS_ERROR="error";
		
		
		
	}
	
	public BubuXmlParserResultImpl processBubuXmlResponse(String xml);
	
	/**
	 * Hier kommen die Variablen
	 */
	public static final String TEST = "v_test";
	public static final String IS_TEST = "1";
	public static final String IS_PRODUCTION = "0";
	
	public static final String ORDERID = "v_orderid";
	public static final String JOBID = "v_jobid";
	/**
	 * Auftragsdaten
	 */
	public static final String VERMERK = "v_vermerk";
	/**
	 * Jobbeschreibung
	 */
	public static final String TEXT = "v_text";
	public static final String PRODUCTCODE = "v_productcode";
	public static final String QTY = "v_qty";	
	public static final String PAGECOUNT = "v_pagecount";
	public static final String FORMAT = "v_format";
	public static final String CONTENT_FILENAME = "v_contentfilename";
	public static final String COVER_FILENAME = "v_coverfilename";
	public static final String COATING = "v_coating";
	public static final String COVER_PAPERCODE = "v_coverpapercode";
	public static final String CONTENT_PAPERCODE = "v_contentpapercode";
	
	/**
	 * Resonse Text
	 */
	
	public static final String BUBU_MSG_SUBJECT="bubu meldet: ";

}
